Optimal. Leaf size=75 \[ -\frac{1}{2} \tan ^{-1}\left (\frac{3-x}{2 \sqrt{x^2-x-1}}\right )+\tanh ^{-1}\left (\frac{1-2 x}{2 \sqrt{x^2-x-1}}\right )+\frac{1}{2} \tanh ^{-1}\left (\frac{3 x+1}{2 \sqrt{x^2-x-1}}\right ) \]
[Out]
_______________________________________________________________________________________
Rubi [A] time = 0.142708, antiderivative size = 75, normalized size of antiderivative = 1., number of steps used = 8, number of rules used = 6, integrand size = 22, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.273 \[ -\frac{1}{2} \tan ^{-1}\left (\frac{3-x}{2 \sqrt{x^2-x-1}}\right )+\tanh ^{-1}\left (\frac{1-2 x}{2 \sqrt{x^2-x-1}}\right )+\frac{1}{2} \tanh ^{-1}\left (\frac{3 x+1}{2 \sqrt{x^2-x-1}}\right ) \]
Antiderivative was successfully verified.
[In] Int[Sqrt[-1 - x + x^2]/(1 - x^2),x]
[Out]
_______________________________________________________________________________________
Rubi in Sympy [A] time = 37.4938, size = 56, normalized size = 0.75 \[ - \frac{\operatorname{atan}{\left (\frac{- x + 3}{2 \sqrt{x^{2} - x - 1}} \right )}}{2} - \operatorname{atanh}{\left (\frac{2 x - 1}{2 \sqrt{x^{2} - x - 1}} \right )} + \frac{\operatorname{atanh}{\left (\frac{3 x + 1}{2 \sqrt{x^{2} - x - 1}} \right )}}{2} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] rubi_integrate((x**2-x-1)**(1/2)/(-x**2+1),x)
[Out]
_______________________________________________________________________________________
Mathematica [A] time = 0.0214565, size = 79, normalized size = 1.05 \[ -\log \left (-2 \sqrt{x^2-x-1}-2 x+1\right )-\frac{1}{2} \log \left (-2 \sqrt{x^2-x-1}+3 x+1\right )+\frac{1}{2} \tan ^{-1}\left (\frac{x-3}{2 \sqrt{x^2-x-1}}\right )+\frac{1}{2} \log (x+1) \]
Antiderivative was successfully verified.
[In] Integrate[Sqrt[-1 - x + x^2]/(1 - x^2),x]
[Out]
_______________________________________________________________________________________
Maple [A] time = 0.02, size = 102, normalized size = 1.4 \[{\frac{1}{2}\sqrt{ \left ( 1+x \right ) ^{2}-2-3\,x}}-{\frac{3}{4}\ln \left ( -{\frac{1}{2}}+x+\sqrt{ \left ( 1+x \right ) ^{2}-2-3\,x} \right ) }-{\frac{1}{2}{\it Artanh} \left ({\frac{-1-3\,x}{2}{\frac{1}{\sqrt{ \left ( 1+x \right ) ^{2}-2-3\,x}}}} \right ) }-{\frac{1}{2}\sqrt{ \left ( -1+x \right ) ^{2}+x-2}}-{\frac{1}{4}\ln \left ( -{\frac{1}{2}}+x+\sqrt{ \left ( -1+x \right ) ^{2}+x-2} \right ) }+{\frac{1}{2}\arctan \left ({\frac{-3+x}{2}{\frac{1}{\sqrt{ \left ( -1+x \right ) ^{2}+x-2}}}} \right ) } \]
Verification of antiderivative is not currently implemented for this CAS.
[In] int((x^2-x-1)^(1/2)/(-x^2+1),x)
[Out]
_______________________________________________________________________________________
Maxima [A] time = 0.79461, size = 112, normalized size = 1.49 \[ \frac{1}{2} \, \arcsin \left (\frac{2 \, \sqrt{5} x}{5 \,{\left | 2 \, x - 2 \right |}} - \frac{6 \, \sqrt{5}}{5 \,{\left | 2 \, x - 2 \right |}}\right ) - \log \left (x + \sqrt{x^{2} - x - 1} - \frac{1}{2}\right ) - \frac{1}{2} \, \log \left (\frac{2 \, \sqrt{x^{2} - x - 1}}{{\left | 2 \, x + 2 \right |}} + \frac{2}{{\left | 2 \, x + 2 \right |}} - \frac{3}{2}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate(-sqrt(x^2 - x - 1)/(x^2 - 1),x, algorithm="maxima")
[Out]
_______________________________________________________________________________________
Fricas [A] time = 0.299299, size = 95, normalized size = 1.27 \[ \arctan \left (-x + \sqrt{x^{2} - x - 1} + 1\right ) - \frac{1}{2} \, \log \left (-x + \sqrt{x^{2} - x - 1}\right ) + \frac{1}{2} \, \log \left (-x + \sqrt{x^{2} - x - 1} - 2\right ) + \log \left (-2 \, x + 2 \, \sqrt{x^{2} - x - 1} + 1\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate(-sqrt(x^2 - x - 1)/(x^2 - 1),x, algorithm="fricas")
[Out]
_______________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \[ - \int \frac{\sqrt{x^{2} - x - 1}}{x^{2} - 1}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((x**2-x-1)**(1/2)/(-x**2+1),x)
[Out]
_______________________________________________________________________________________
GIAC/XCAS [A] time = 0.275068, size = 99, normalized size = 1.32 \[ \arctan \left (-x + \sqrt{x^{2} - x - 1} + 1\right ) - \frac{1}{2} \,{\rm ln}\left ({\left | -x + \sqrt{x^{2} - x - 1} \right |}\right ) + \frac{1}{2} \,{\rm ln}\left ({\left | -x + \sqrt{x^{2} - x - 1} - 2 \right |}\right ) +{\rm ln}\left ({\left | -2 \, x + 2 \, \sqrt{x^{2} - x - 1} + 1 \right |}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate(-sqrt(x^2 - x - 1)/(x^2 - 1),x, algorithm="giac")
[Out]